<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=0, viewport-fit=cover" />
	<title>eventLoop</title>
</head>
<body>
<script>
// 结果 1 2 4 5 3
// 同步任务 []
// 异步微任务 []
// 异步宏任务 []
console.log(1)
console.log(2)

setTimeout(() => {
	console.log(3)
})

Promise.resolve().then(() => {
	console.log(5)
})

console.log(4)
</script>
</body>
</html>
